package cn.fuhe.controller.user;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.fuhe.bean.User;
import cn.fuhe.bean.UserAddress;
import cn.fuhe.controller.BaseServlet;
import cn.fuhe.dao.UserAddressDao;
@WebServlet("/refresh")
public class RefreshAddress extends BaseServlet{

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		User user = (User)req.getSession().getAttribute("user");
		req.setAttribute("user", user);
		UserAddressDao uaDao = new UserAddressDao();
		List<UserAddress> useraddressList = uaDao.selectUserAddressMessage(user.getId());
		forward("/personalcenter/address");
	}

}
